CC=arm-linux-gnueabihf-gcc
KER_DIR=/home/ztmy/imx6ull/linux_4.1.15/linux-imx-rel_imx_4.1.15_2.1.0_ga_alientek/
CUR_DIR=`pwd`
MOD_NAME=led_drv
APP_NAME=led_app

all:
	$(MAKE) -C $(KER_DIR) M=$(CUR_DIR) modules
	$(CC) $(APP_NAME).c -o $(APP_NAME)

clean:
	$(MAKE) -C $(KER_DIR) M=$(CUR_DIR) clean
	rm -rf $(APP_NAME)

install:
	sudo cp -raf $(APP_NAME) *.ko /nfs/rootfs/modules

obj-m=$(MOD_NAME).o